/*
 * Powered By [rapid-framework]
 * Web Site: http://www.rapid-framework.org.cn
 * Google Code: http://code.google.com/p/rapid-framework/
 * Since 2008 - 2013
 */

package com.smg.community.model;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;


import javacommon.base.*;

/**
 * @author badqiu email:badqiu(a)gmail.com
 * @version 1.0
 * @since 1.0
 */


public class SmgIndexTopFiveimages extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias id,imagePath,imageTitle,groupName,groupLink,imageLink,showOrder,state
	public static final String TABLE_ALIAS = "SmgIndexTopFiveimages";
	public static final String ALIAS_ID = "id";
	public static final String ALIAS_IMAGE_PATH = "imagePath";
	public static final String ALIAS_IMAGE_TITLE = "imageTitle";
	public static final String ALIAS_GROUP_NAME = "groupName";
	public static final String ALIAS_GROUP_LINK = "groupLink";
	public static final String ALIAS_IMAGE_LINK = "imageLink";
	public static final String ALIAS_SHOW_ORDER = "showOrder";
	public static final String ALIAS_STATE = "state";
	
	//date formats
	
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
    /**
     * id       db_column: id 
     */	
	
	private java.lang.Integer id;
    /**
     * imagePath       db_column: imagePath 
     */	
	private java.lang.String imagePath;
    /**
     * imageTitle       db_column: imageTitle 
     */	
	private java.lang.String imageTitle;
    /**
     * groupName       db_column: groupName 
     */	
	private java.lang.String groupName;
    /**
     * groupLink       db_column: groupLink 
     */	
	private java.lang.String groupLink;
    /**
     * imageLink       db_column: imageLink 
     */	
	private java.lang.String imageLink;
    /**
     * showOrder       db_column: showOrder 
     */	
	private java.lang.Integer showOrder;
    /**
     * state       db_column: state 
     */	
	private java.lang.Integer state;
	//columns END
	
	private int cityNo;

	private String cityName;
	

	public SmgIndexTopFiveimages(){
	}

	public SmgIndexTopFiveimages(
		java.lang.Integer id
	){
		this.id = id;
	}

	public void setId(java.lang.Integer value) {
		this.id = value;
	}
	
	public java.lang.Integer getId() {
		return this.id;
	}
	public void setImagePath(java.lang.String value) {
		this.imagePath = value;
	}
	
	public java.lang.String getImagePath() {
		return this.imagePath;
	}
	public void setImageTitle(java.lang.String value) {
		this.imageTitle = value;
	}
	
	public java.lang.String getImageTitle() {
		return this.imageTitle;
	}
	public void setGroupName(java.lang.String value) {
		this.groupName = value;
	}
	
	public java.lang.String getGroupName() {
		return this.groupName;
	}
	public void setGroupLink(java.lang.String value) {
		this.groupLink = value;
	}
	
	public java.lang.String getGroupLink() {
		if (groupLink!=null &&  groupLink.indexOf("http://") == -1){
			groupLink = "http://"+groupLink;
		}
		return this.groupLink;
	}
	public void setImageLink(java.lang.String value) {
		this.imageLink = value;
	}
	
	public java.lang.String getImageLink() {
		if ( imageLink!=null && imageLink.indexOf("http://") == -1){
			imageLink = "http://"+imageLink;
		}
		return this.imageLink;
	}
	public void setShowOrder(java.lang.Integer value) {
		this.showOrder = value;
	}
	
	public java.lang.Integer getShowOrder() {
		return this.showOrder;
	}
	public void setState(java.lang.Integer value) {
		this.state = value;
	}
	
	public java.lang.Integer getState() {
		return this.state;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Id",getId())
			.append("ImagePath",getImagePath())
			.append("ImageTitle",getImageTitle())
			.append("GroupName",getGroupName())
			.append("GroupLink",getGroupLink())
			.append("ImageLink",getImageLink())
			.append("ShowOrder",getShowOrder())
			.append("State",getState())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof SmgIndexTopFiveimages == false) return false;
		if(this == obj) return true;
		SmgIndexTopFiveimages other = (SmgIndexTopFiveimages)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}

	public int getCityNo() {
		return cityNo;
	}

	public void setCityNo(int cityNo) {
		this.cityNo = cityNo;
	}

	public String getCityName() {
		return cityName;
	}

	public void setCityName(String cityName) {
		this.cityName = cityName;
	}
}

